package com.canaan.business.mapper.inOutStock;

import com.canaan.business.domain.inOutStock.StorehouseStockCheck;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 待检仓库存Mapper接口
 *
 * @author ruoyi
 * @date 2023-03-09
 */
public interface StorehouseStockCheckMapper {
    /**
     * 查询待检仓库存
     *
     * @param id 待检仓库存主键
     * @return 待检仓库存
     */
    public StorehouseStockCheck selectStorehouseStockCheckById(Long id);

    /**
     * 查询待检仓库存列表
     *
     * @param storehouseStockCheck 待检仓库存
     * @return 待检仓库存集合
     */
    public List<StorehouseStockCheck> selectStorehouseStockCheckList(StorehouseStockCheck storehouseStockCheck);

    /**
     * 查询待检仓库存列表
     *
     * @param storehouseStockCheck 待检仓库存
     * @return 待检仓库存集合
     */
    public List<StorehouseStockCheck> selectStorehouseStockCheckList2(StorehouseStockCheck storehouseStockCheck);

    /**
     * 新增待检仓库存
     *
     * @param storehouseStockCheck 待检仓库存
     * @return 结果
     */
    public int insertStorehouseStockCheck(StorehouseStockCheck storehouseStockCheck);

    /**
     * 批量新增待检仓库存
     *
     * @param storehouseStockCheckList 待检仓库存列表
     * @return 结果
     */
    public int batchInsertStorehouseStockCheck(List<StorehouseStockCheck> storehouseStockCheckList);

    /**
     * 修改待检仓库存
     *
     * @param storehouseStockCheck 待检仓库存
     * @return 结果
     */
    public int updateStorehouseStockCheck(StorehouseStockCheck storehouseStockCheck);

    /**
     * 批量修改待检仓库存
     *
     * @param storehouseStockCheckList 待检仓库存列表
     * @return 结果
     */
    public int batchUpdateStorehouseStockCheck(List<StorehouseStockCheck> storehouseStockCheckList);

    /**
     * 删除待检仓库存
     *
     * @param id 待检仓库存主键
     * @return 结果
     */
    public int deleteStorehouseStockCheckById(Long id);

    /**
     * 批量删除待检仓库存
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteStorehouseStockCheckByIds(Long[] ids);

    /**
     * 查询待检仓库存
     *
     * @param no 编号
     * @return 待检仓库存
     */
    public StorehouseStockCheck selectStorehouseStockCheckByNo(String no);


    /**
     * By条码查询待检仓库存
     * @param barcode
     * @return
     */
   public   StorehouseStockCheck selectStorehouseStockCheckByBarcode(String barcode);

    /**
     * 根据条码获取库存信息列表
     *
     * @param barcodes 条码列表
     * @return 库存集合
     */
    public List<StorehouseStockCheck> getListByBarcodes(List<String> barcodes);

    /**
     * 批量删除待检仓库存
     *
     * @param nos 需要删除的编号集合
     * @return 结果
     */
    public int deleteStorehouseStockCheckByNos(String[] nos);

    /**
     * 删除待检仓库存信息
     *
     * @param no 编号
     * @return 结果
     */
    public int deleteStorehouseStockCheckByNo(String no);

    /**
     * 删除待检仓库存信息
     *
     * @param taskNo 质检任务编号
     * @param status 状态
     * @return 结果
     */
    int updateStockStatusByTaskNo(@Param("taskNo")String taskNo, @Param("status")String status);

}
